﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace MTO.Framework.Web.Mvc
{
    public static class UrlExtensions
    {
        public static bool IsCurrent(this UrlHelper urlHelper, String areaName)
        {
            return urlHelper.IsCurrent(areaName, null, null);
        }
  
        public static bool IsCurrent(this UrlHelper urlHelper, String areaName, String controllerName)
        {
            return urlHelper.IsCurrent(areaName, controllerName, null);
        }
  
        public static bool IsCurrent(this UrlHelper urlHelper, String areaName, String controllerName, params String[] actionNames)
        {
            return urlHelper.RequestContext.IsCurrentRoute(areaName, controllerName, actionNames);
        }
    }
}
